.visibility__toggle-checkbox {
    display: none;
}

.visibility__toggle-label {
    position: relative;
    cursor: pointer;
    width: 50px;
    height: 20px;
    background: grey;
    border-radius: 10px;
    transition: background-color 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
}

.lock,
.earth {
    position: absolute;
    height: 12px;
    width: 12px;
}

.lock {
    left: 4px;
}

.earth {
    right: 4px;
}

.visibility__toggle-label::after {
    content: '';
    position: absolute;
    top: 1px;
    left: 1px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    transition: all 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
}

.visibility__toggle-checkbox:checked+.visibility__toggle-label {
    background: #ED225D;
}

.visibility__toggle-checkbox:checked+.visibility__toggle-label::after {
    left: calc(100% - 1px);
    transform: translateX(-100%);
}

.visibility__toggle-label:active:after {
    width: 30px;
}

.visibility__toggle-checkbox:checked+.visibility__toggle-label::after {
    animation: slideText 0.3s ease-in-out forwards;
}